﻿using System;
using Framework;

namespace Enterprise.Admin.Handle
{
    /// <summary>
    /// 修改系统设置
    /// </summary>
    public partial class EditSetting : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            object result;
            try
            {
                string action = Fq("action").SafeToString();
                string language = Fq("CoLanguage").SafeToString();
                var settingService = new SettingService();
                string value = Fq(action).SafeToString();
                settingService.Set(action, value, language);
                result = new { state = true, message = "修改成功！" };
            }
            catch (Exception ex)
            {
                result = new { state = false, message = ex.Message };
            }
            Json(result);
        }
    }
}